package com.example.logindemo.demo.mapper;


import com.example.logindemo.demo.bean.Book;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

//使用Mybatis原生功能
@Mapper
public interface BookMapper {
    //获取指定书本
    @Select("select * from tp_book where id=#{id}")
    Book getBook(Long id);

    //插入书
    Book inserBook(Book book);
}
